package com.xudu.controller.impl;

import com.xudu.controller.IUserController;
import com.xudu.service.IUserService;
import com.xudu.utils.Resoult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.*;

/**
 * ClassName: UserControllerImpl
 * Description:
 *
 * @Author xudu
 * @Create 2024/4/9
 */
@RestController
@ResponseBody
//@Service
@RequestMapping("user")
public class UserControllerImpl implements IUserController {

    /**
     * 调用业务层
     */
    @Autowired
    private IUserService iUserService;


    @Override
    @GetMapping("/login")
    public Resoult login(String username, String password) {


        return iUserService.login(username,password);

//        Resoult login = iUserService.login(username,password);
//        if (login){
//            return "login";
//        }else {
//            return "success";
//        }

    }
}
